<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<!DOCTYPE html>
<html>
<head>
    <title>审核</title>
    <%@ include file="/WEB-INF/component/commonCSS.jsp"%>
    <!--[if lt IE 9]>
        <script src="${ctx}/lib/js/html5shiv.min.js"></script>
        <script src="${ctx}/lib/js/respond.min.js"></script>
    <![endif]-->
</head>
<body class="skin-blue sidebar-mini fixed skin-blue-light-frame">
    <section class="content-header">
        <h1>审核</h1>
        <ol class="breadcrumb">
            <li><a href="${ctx}/home.jsp"><i class="fa fa-home"></i>首页</a></li>
            <li class="active"><a href="expertList.html">结算单管理</a></li>
            <li class="active"><a href="#">审核</a></li>
        </ol>
    </section>
    <section class="content">
        <div class=" box box-success ">
            <form  class="form-horizontal" id="form" action="auditFirstOne.html" method="post" >
            	<div class="box-body">
                    <div class="form-group form-group-xs">
                        <label for="techPos" class="col-sm-2 text-right">结算单号：</label>
                        <div class="col-sm-4 text-left">
                            <input class="form-control" id="techPos" value="${info.settlementCode}" readOnly="readOnly" type="text">
                        </div>
                        <label for="techPosCertNo" class="col-sm-2 text-right">结算单名称：</label>
                        <div class="col-sm-4 text-left">
			              	  <input class="form-control" type="text" value="${info.settlementName}"   readOnly="readOnly" />
                        </div>
                    </div> 
                    
                    <div class="form-group form-group-xs">
                    	<label for="position" class="col-sm-2 text-right">总条目数：</label>
                        <div class="col-sm-4 text-left">
	                 		   <input class="form-control" type="text" value="${info.totalOrders}"   readOnly="readOnly" />
                        </div>
                        <label for="industry" class="col-sm-2 text-right">总金额：</label>
                        <div class="col-sm-4 text-left">
                            <input class="form-control" type="text" value="${info.totalAmount}"   readOnly="readOnly" />
                        </div>
                    </div>
                    
                    <div class="form-group form-group-xs">
                        <label for="expertCode" class="col-sm-2 text-right">创建时间：</label>
                        <div class="col-sm-4 text-left">
                             <input class="form-control" type="text" value="${info.createDatetime}"   readOnly="readOnly" />
                        </div>
                        <label for="name" class="col-sm-2 text-right">创建人：</label>
                        <div class="col-sm-4 text-left">
                              <input class="form-control" type="text" value="${info.createUser}"   readOnly="readOnly" />
                        </div>
                    </div>
                 
                    <div class="form-group form-group-xs">
                        <label for="remark" class="col-sm-2 control-label">备注：</label>
                        <div class="col-sm-10">
                            <textarea class="form-control" rows="3"  value="${info.remarks}"  readOnly="readOnly" >${info.remarks}</textarea>
                        </div>
                         <label for="name" class="col-sm-2 text-right">审核备注：</label>
                         <div class="col-sm-10">
                            <textarea class="form-control" rows="3" id="auditRemark"  name="auditRemark" value=""  placeholder="审核备注" ></textarea>
                        </div>
                    </div>
                    
                </div>
                <div class="box-footer text-center">
                    <button type="button" class="btn btn-success btn-sm" >通 过</button>
                    <button type="button" class="btn btn-fail btn-sm" >不通过</button>
                    <a href="${ctx}/settlementFirst/toAuditFirstOneList.html" class="btn btn-danger btn-sm">返 回</a>
                </div>
            </form>
        </div>
    </section>
	<%@ include file="/WEB-INF/component/commonJS.jsp"%>
    <script type="text/javascript">
    $(function(){
    	$('.btn-success').click(function(){
			 $.HN.message.confirm('确定通过审核吗？', '', '').on(function (e) {
                 if (e) {
                	  $.post('auditFirstOne.html', {settlementId: "${info.settlementId}",status:"1",auditRemark:$('#auditRemark').val()},
                		function (success) {
	               			if (success) {
	           					$.HN.message.alert("审核成功！", "消息", "success", function() {
	           						document.location = "${ctx}/settlementFirst/toAuditFirstOneList.html";
	           					});
	           				} else {
	           					$.HN.message.alert(msg || "审核失败！", "消息", "error");
	           				}
                	    })
                 }
    	     });
        });
    	$('.btn-fail').click(function(){
			 $.HN.message.confirm('确定不通过审核吗？', '', '').on(function (e) {
                if (e) {
                 $.post('auditFirstOne.html', {settlementId: "${info.settlementId}",status:"2"}, 
                		 function (success) {
		         			if (success) {
		    					$.HN.message.alert("操作成功！", "消息", "success", function() {
		    						document.location = "${ctx}/settlementFirst/toAuditFirstOneList.html";
		    					});
		    				} else {
		    					$.HN.message.alert(msg || "操作失败！", "消息", "error");
		    				}
        		});
                 
        /*        	 $('#form').ajaxSubmit({
               		dataType:"json",
            			success: function (result) {
                			if (result.success) {
            					$.HN.message.alert("操作成功！", "消息", "success", function() {
            						document.location = "${ctx}/postOrder/toAuditPostOrderListBySetCenter.html";
            					});
            				} else {
            					$.HN.message.alert(result.msg || "操作失败！", "消息", "error");
            				}
                		}
                	}); */
               	 
               	 
               	 
               	 
                }
   	     });
       });
    	
    
    })
 </script>
</body>
</html>